package de.xXephis.MeineMensa.XMLEntity;

import java.io.Serializable;
import java.util.List;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.ElementList;


public class Counter implements Serializable{
	private static final long serialVersionUID = -8415604114207050549L;
	@Attribute(required = false) 
	public String bg_color;
	@Attribute(required = false) 
	public String fg_color;
	@Attribute(required = false) 
	public String foodplan_id;
	@Attribute
	public String food_name;
	@Attribute
	public String food_name2;
	@Attribute
	public String img_url;
	@Attribute
	public String food_price_cat_1;
	@Attribute
	public String food_price_cat_2;
	@Attribute
	public String food_price_cat_3;
	@ElementList(inline=true,required=false)
	public List<Extra> extra;

	public static String convert_Extralist(List<Extra> list)
	{
		if(list == null)
			return "";
		String l="";
		for(Extra p:list)
		{
			l+=p.food_extra_name+", ";
		}
		return l.substring(0, l.length()-2);
	}
}

